<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>My JSP 'index.jsp' starting page</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<style type="text/css">
			#files {
				width: 300px;
				height: 100px;
			}
		</style>
		<script src="//cdn.bootcss.com/jquery/1.12.4/jquery.js"></script>
	</head>

	<body>
		
		<form action="UpLoadImage" method="post" enctype="multipart/form-data">
			<input type="file" id="files" name="file1" multiple="multiple">
			
			<input type="submit" value="提交"/>  
		</form>
		
		
	</body>
	

	
	
	<script>
		
		var xhr = new XMLHttpRequest();
		xhr.timeout = 16000;
		xhr.responseType = "text";
		xhr.open('POST', '/face', true);
		xhr.onload = function(){
			if(this.status == 200||this.status == 304){
				console.log(this);
			
		        var obj = this.responseText;
		        console.log(obj);
		        
		        console.log(JSON.parse(obj));
		        
		    }
		}
		xhr.send(null);
		
	</script>
	
	
</html>
